﻿@model IEnumerable<KopeykaStore.Models.Order>

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<table>
    <tr>
        <th>
            FirstName
        </th>
        <th>
            LastName
        </th>
        <th>
            Address
        </th>
        <th>
            City
        </th>
        <th>
            PostalCode
        </th>
        <th>
            Phone
        </th>
        <th>
            Email
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.FirstName)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.LastName)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Address)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.City)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.PostalCode)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Phone)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Email)
        </td>
        <td>
            @Html.ActionLink("Details", "Details", new { id=item.OrderId }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.OrderId })
        </td>
    </tr>
}

</table>
